<%@ page language="java" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>建模工具</title>

	<link rel="stylesheet/less" href="css/base.less"/>
	<link rel="stylesheet/less" href="css/umlCanvas.less"/>
	<link rel="stylesheet/less" href="css/edit_dialog.less"/>
	<link rel="stylesheet/less" href="css/index.less"/>
	<script type="text/javascript" src="lib/less-1.7.1.min.js"></script>

	<!-- 插件css -->
	<link rel="stylesheet" href="${path}/resources/plugins/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<link rel="stylesheet" href="lib/dialog/style.css" type="text/css">
	<link rel="stylesheet" href="lib/tab/css/style.css" type="text/css"/>
	<link rel="stylesheet" href="lib/comboBox/css/style.css" type="text/css"/>

	<link rel="stylesheet" href="css/ace.min.css"/>
	<link rel="stylesheet" href="css/bootstrap.min.css"/>

	<link rel="stylesheet" href="css/layer.css"/>
	<link rel="stylesheet" href="${path}/resources/ace/assets/css/ui.jqgrid.css" type="text/css">
	<link rel="stylesheet" href="css/dbbox_public.css"/>


	<style>
		.label {
			display: inline-block;
			width: 70px;
		}

		.enumitems .enumItem {
			margin: 2px 0;
			padding: 2px;
		}

		.not_null {
			background-position: right -688px !important;
			box-shadow: 1px 1px 15px rgba(255, 167, 155, 0.8) !important;
			border-color: rgba(255, 167, 155, 0.8) !important;
		}

		/*弹窗内表单的样式*/
		.dialog_form label {
			padding-right: 10px;
		}

		.dialog_form input {
			width: 250px;
		}

		.dialog_buttons {
			text-align: right;
			padding: 5px 0px;
		}

		.dialog_buttons button {
			outline: none;
			padding: 5px 10px;
			font-size: 14px;
			border: 0;
			cursor: pointer;
		}

		.dialog_buttons button:hover {
			background: #A0C1FF;
		}

		.dialog_buttons button:active {
			background: #5A94FF;
		}

		.option_list div {
			cursor: pointer;
			text-align: center;
		}

		.option_list div:hover {
			background: #ffebbf;
		}

		.option_list .selected {
			background: #ccc;
		}

		/* *****************************custom**************************** */
		/* 解决tab中按钮高度问题 */
		.canvas .tools_bar span {
			height: 28px;
		}

		/* 解决tab工具栏高度问题 */
		.uml_tools hr {
			margin-top: 0px;
			margin-bottom: 0px;
			border-top: 1px solid #eee;
		}

		/* 自适应panel相关高度 */
		.panel {
			margin-bottom: 20px;
			background-color: #fff;
			border: none;
			border-radius: 4px;
			-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
			 box-shadow: 0px;
		}

		.main-content, body, html {
			min-height: 98%;
		}
		body, html {
			margin: 0;
			height: 98%;
		}

	</style>
</head>
<body>

<div>
	<div id="wrapper">
		<div id="container">
			<div class="left">
				<!-- 工程窗口 -->
				<div class="project_tree project_explorer" id="projectExplorer">
					<div class="panel-heading">
						<span>项目列表</span>
						<%--<button id="add_project">添加项目</button>--%>
						<button id="openWinAddVersion" style="display:none;">添加版本</button>
						<button id="openWinAddModule" style="display:none;">添加模块</button>
						<button id="openWinEditModule" style="display:none;">编辑模块</button>
						<button id="delModule" style="display:none;">删除模块</button>

					</div>
					<ul id="projectTree" class="ztree"></ul>
				</div>
			</div>
			<div class="right">
				<div class="main_panel">
					<div class="tabs">
						<div id="tab_index" class="tab active" for="index"><span class="title">主页</span></div>
					</div>
					<div class="panels">
						<div class="panel index active" style="text-align:center;">
							<h1>欢迎使用建模工具</h1>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- 一些共用模板 -->
	<div id="template" style="display: none;">
		<!-- 线条模板 -->
		<svg id="line-template">
			<!-- 继承关系连线模板 -->
			<g class="line extends templine" relationType="extends">
				<polyline points="0,0 0,0" style="marker-end:url(#arrow1)"></polyline>
			</g>

			<!-- 实现关系连线模板
			<g class="line implements templine" relationType="implements">
				<polyline points="0,0 0,0" style="marker-end:url(#arrow1);stroke-dasharray:5"></polyline>
			</g>
			-->
			<!-- 聚合关系连线模板
			<g class="line aggregate templine" relationType="aggregate">
				<foreignobject>
					<div class="start line_info">
						<div class="multiplicity">
							<span class="multiplicity_type">1</span>
						</div>
					</div>
					<div class="end line_info">
						<div class="multiplicity">
							<span class="multiplicity_type">1</span>
						</div>
					</div>
				</foreignobject>
				<polyline points="0,0 0,0"></polyline>
			</g>
			-->
			<!-- 组合关系连线模板
			<g class="line compose templine" relationType="compose">
				<foreignobject>
					<div class="start line_info">
						<div class="multiplicity">
							<span class="multiplicity_type">1</span>
						</div>
					</div>
					<div class="end line_info">
						<div class="multiplicity">
							<span class="multiplicity_type">1</span>
						</div>
					</div>
				</foreignobject>
				<polyline points="0,0 0,0"></polyline>
			</g>
			-->
			<!--关联关系连线模板-->
			<g class="line associate templine" relationType="associate">
				<foreignobject>
					<div class="start line_info">
						<div class="multiplicity">
							<span class="multiplicity_type">1</span>
						</div>
					</div>
					<div class="end line_info">
						<div class="multiplicity">
							<span class="multiplicity_type">1</span>
						</div>
					</div>
				</foreignobject>
				<polyline points="0,0 0,0"></polyline>
			</g>
		</svg>

		<!-- 节点模板 -->
		<div id="node-template">
			<!-- 实体模板 -->
			<div class="node entity">
				<div class="header">
					<span class="entityType node_type">ENTITY</span>
					<div class="name">Entity</div>
				</div>
				<div class="properties"></div>
				<%--<div class="actions"></div>--%>
			</div>

			<!-- 行为模板 -->
			<div class="action public">
				<span class="actionName"></span>
				<div class="arguments"></div>
				<span class="returnType">void</span>
			</div>

			<!-- 行为的参数模板 -->
			<div class="action_argument">
				<span class="argumentType"></span>
				<span class="argumentGenericity genericity"></span>
			</div>

			<!-- 属性模板  -->
			<div class="property private" onclick="console.log(this)">
				<span class="propertyNameCn"></span>
				<span class="propertyName"></span>
            <span class="property_type">
			    <span class="propertyType"></span>
			    <span class="genericity">?</span>
			</span>
				<span class="propertyIsPk"></span>
			</div>

			<!-- 接口模板
			<div class="node interface">
				<div class="header">
					<div class="node_type">INTERFACE</div>
					<div class="name"></div>
				</div>
				<div class="actions"></div>
			</div>
			-->

			<!-- 枚举模板
			<div class="node enum">
				<div class="header">
					<div class="node_type">ENUM</div>
					<div class="name"></div>
				</div>
				<div class="enumItems"></div>
			</div>
			<div class="enumItem">ENUMITEM</div>
			-->

		</div>

		<div id="dialog_template">
			<div class="action_item">
				<div class="action_detail">
					<span class="action_name public"></span>
					<span class="action_arguments"></span>
					<span class="action_returnType"></span>
				</div>
				<div class="edit_option">
					<a href="javascript:void(0);" class="edit_action">编辑</a>
					<a href="javascript:void(0);" class="delete_action">删除</a>
				</div>
			</div>
			<!-- span内不允许输入英文和数字以外的字符 -->
			<script>
				function checkKey(event) {
					var keyCode = event.keyCode;
					if (keyCode == 46 || keyCode == 8) {
						return true;
					} else {
						return /^[A-Za-z0-9_]\b$/.test(String.fromCharCode(keyCode));
					}
				}
			</script>

			<div class="argument_item">
				<div class="argument_detail">
					<span class="argument_name" contenteditable="true" onkeydown="return checkKey(event);"
						  onblur='$(this).attr("title",$(this).text());'></span>
					<span style="padding:2px">:</span>
					<span class="argument_type" contenteditable="true" onkeydown="return checkKey(event);"
						  oninput='$(this).attr("title",$(this).text());'></span>
					<span class="genericity" contenteditable="true" onkeydown="return checkKey(event);"
						  onblur='$(this).attr("title",$(this).text());' style="display:none;">?</span>
				</div>
				<div class="argument_detail_option">
					<a href="javascript:void(0);" class="delete_argument">删除</a>
				</div>
			</div>

			<!-- 编辑枚举项 -->
			<div class="enum_item">
				<div class="enum_name"></div>
				<div class="delete_enum_item">删除</div>
			</div>
		</div>
	</div>
	<!-- 以下内在多个画板时的情况下可以共用 ，包括图形的模板、右键菜单等元素-->
	<!-- uml元素模板 -->
	<svg style="height:0;position:absolute;">
		<defs>
			<!-- 空心三角形 -->
			<marker id="arrow1" markerWidth="100" markerHeight="100" refx="16" refy="13" orient="auto">
				<path d="M10,10 L16,13 L10,16 z"
					  style="fill:#e8e8e8;stroke:#5890c1;stroke-dasharray:0;stroke-width:1;"></path>
			</marker>
			<!-- 空心菱形 -->
			<marker id="arrow2" markerWidth="100" markerHeight="100" refx="10" refy="13" orient="auto">
				<path d="M10,13 L16,10 L22,13 L16,16 L10,13 z"
					  style="fill:#e8e8e8;stroke:#5890c1;stroke-dasharray:0;stroke-width:1;"></path>
			</marker>
			<!-- 实心菱形 -->
			<marker id="arrow3" markerWidth="100" markerHeight="100" refx="10" refy="13" orient="auto">
				<path d="M10,13 L16,10 L22,13 L16,16 L10,13 z"
					  style="fill:#5890c1;stroke-dasharray:0;stroke-width:1;"></path>
			</marker>
		</defs>
	</svg>
	<!-- 各种右键编辑菜单 -->
	<div id="edit_contextmenus">
		<!-- 添加节点成员的右键菜单 -->
		<div id="add_members" class="contextmenu" tabindex="1">
			<%--<div class="contextmenu_item add_property"><div>添加属性</div></div>
			<div class="contextmenu_item add_action"><div>添加行为</div></div>
			<div class="contextmenu_item add_enumItem"><div>添加枚举项</div></div>--%>
			<div class="contextmenu_item delete">
				<div>删除</div>
			</div>
		</div>

		<!--
		<div id="add_nodes" class="contextmenu" tabindex="2">
			<div class="contextmenu_item add_entity"><div>添加实体</div></div>
			<div class="contextmenu_item add_interface"><div>添加接口</div></div>
			<div class="contextmenu_item add_enum"><div>添加枚举</div></div>
		</div>
		-->

		<!-- 编辑线条的右键菜单  -->
		<div id="edit_lines" class="contextmenu" tabindex="3">
			<div class="contextmenu_item line_of_centers">
				<div>连心线</div>
			</div>
			<div class="contextmenu_item delete">
				<div>删除</div>
			</div>
		</div>
	</div>

	<datalist id="property_type_tip">
		<option value="String">String</option>
		<option value="Set">Set</option>
		<option value="List">List</option>
		<option value="Date">Date</option>
		<option value="Long">Long</option>
		<option value="Integer">Integer</option>
	</datalist>
</div>

<div>
	<%--新增修改模块弹窗部分start--%>
	<div class="modal-content" id="moduleAddOrModifyModal" style="display: none; padding: 10px;">
		<form id="moduleAddOrEditForm" action="">
			<table class="sun-form-table">
				<tr>
					<td><input type="text" name="id" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="projectId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="accountId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="databaseId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="dbInfoId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="shorIndex" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="versionId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="pathUrl" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="parentId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="createTime" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="modifyTime" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="createAccountId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="modifyAccountId" class="sun-form-input form-control hide"/></td>
				</tr>
				<tr>
					<th>模块名称</th>
					<td><input type="text" name="name" class="sun-form-input form-control" id="moduleName"
							   style="width:150px"
							   required="required"/></td>
				</tr>
				<tr>
					<th>所属连接</th>
					<td><input id="relDbConnInfo" type="text" name="dbConnInfoName" class="sun-form-input form-control"
							   required="required"
							   style="width:150px" placeholder="双击出现选择弹窗"
							   readonly="true" ondblclick="pdmOpenWin.openWinDbConnInfo()"/></td>
				</tr>
				<tr>
					<th style="width:70px">所属数据库</th>
					<td><input id="relDatabase" type="text" name="databaseName" class="sun-form-input form-control"
							   required="required"
							   style="width:150px" placeholder="双击出现选择弹窗"
							   readonly="true" ondblclick="pdmOpenWin.openWinDatabase()"/></td>
				</tr>
				<tr>
					<th>模块备注</th>
					<td colspan="4"><textarea rows="4" cols="1" name="remark" class="sun-form-input form-control"
											  id="moduleRemark" style="resize: vertical"></textarea></td>
				</tr>
			</table>
		</form>
	</div>
	<%--新增修改模块弹窗部分end--%>

	<%--双击所属连接弹窗部分start--%>
	<div class="modal-content" id="relDbConnInfoModal" style="display: none;overflow-x: hidden">
		<div class="row">
			<div class="col-xs-12">
				<form action="" id="dbSearchForm">
					<div class="col-xs-12 sun-research-content">
						<!-- 文本形式的查询条件 -->
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-4 col-sm-4 col-lg-4 sun-control-label"
								   style="font-size: 13px;">数据库名</label>
							<div class="col-xs-8 col-sm-8 col-lg-8 sun-control-input">
								<input type="text" name="Q_p.dbName_like"
									   class="sun-form-input form-control"
									   style="height: 29px;"/>
							</div>
						</div>
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-3 col-sm-4 col-lg-3 sun-control-label"
								   style="font-size: 13px;">端&nbsp;口</label>
							<div class="col-xs-9 col-sm-8 col-lg-9 sun-control-input">
								<input type="text" name="Q_p.port_=_int"
									   class="sun-form-input form-control"
									   style="height: 29px;"/>
							</div>
						</div>
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-3 col-sm-4 col-lg-3 sun-control-label"
								   style="font-size: 13px;">状&nbsp;态</label>
							<div class="col-xs-9 col-sm-8 col-lg-9 sun-control-input">
								<select class="select2 sun-form-select" name="Q_p.status_=_short"
										id="dbStatus" style="height: 29px;">
								</select>
							</div>
						</div>
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-3 col-sm-4 col-lg-3 sun-control-label"
								   style="font-size: 13px;">类&nbsp;型</label>
							<div class="col-xs-9 col-sm-8 col-lg-9 sun-control-select">
								<select class="select2 sun-form-select" name="Q_p.type_=_short" id="dbType"
										id="dbType" style="height: 29px;">
								</select>
							</div>
						</div>
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-3 col-sm-4 col-lg-3 sun-control-label"
								   style="font-size: 13px;">编&nbsp;码</label>
							<div class="col-xs-9 col-sm-8 col-lg-9 sun-control-input">
								<select class="select2 sun-form-select" name="Q_p.charset_=_short"
										id="dbCharset" style="height: 29px;">
								</select>
							</div>
						</div>
					</div>
				</form>
				<div class="col-sm-12">
					<button id="dbConnInfoSearch" type="button" class="btn btn-success btn-sm">
						<span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;查询
					</button>
					<button id="dbConnInfoClear" type="button" class="btn btn-info btn-sm">
						<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
					</button>
					<%--<button id="dbConnInfoAdd" type="button" class="btn btn-primary btn-sm">
						<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;新增
					</button>--%>

				</div>
				<div class="col-sm-12" style="margin-top:10px; margin-bottom:10px; width: 880px;">
					<table id="dbInfoJqgridTable"></table>
					<div id="dbInfoJqgridPager" style="height:45px;"></div>
				</div>
			</div>
		</div>
	</div>
	<%--双击所属连接弹窗部分end--%>

	<%--双击所属数据库弹窗部分start--%>
	<div class="modal-content" id="relDbModal" style="display: none;overflow-x: hidden">
		<div class="row">
			<div class="col-xs-12">
				<form action="" id="databaseSearchForm">
					<div class="col-xs-12 sun-research-content">
						<!-- 文本形式的查询条件 -->
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-4 col-sm-4 col-lg-4 sun-control-label"
								   style="font-size: 13px;">数据库名</label>
							<div class="col-xs-8 col-sm-8 col-lg-8 sun-control-input">
								<input type="text" name="Q_p.name_like"
									   class="sun-form-input form-control"
									   style="height: 29px;"
									   required="required"/>
							</div>
						</div>
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-3 col-sm-4 col-lg-3 sun-control-label"
								   style="font-size: 13px;">中文名</label>
							<div class="col-xs-9 col-sm-8 col-lg-9 sun-control-input">
								<input type="text" name="Q_p.nameCn_like"
									   class="sun-form-input form-control"
									   style="height: 29px;"/>
							</div>
						</div>
						<div class="form-group col-xs-6 col-sm-3 sun-form-input">
							<label class="col-xs-3 col-sm-4 col-lg-3 sun-control-label"
								   style="font-size: 13px;">编&nbsp;码</label>
							<div class="col-xs-9 col-sm-8 col-lg-9 sun-control-input">
								<select class="select2 sun-form-select" name="Q_p.databaseCode_=_short"
										id="dbCode" style="height: 29px;
										required">
								</select>
							</div>
						</div>
						<input type="text" name="Q_p.versionId_=_Long" id="databaseVersion"
							   class="sun-form-input form-control hide" value="-1"/>
					</div>
				</form>
				<div class="col-sm-12">
					<button id="databaseSearch" type="button" class="btn btn-success btn-sm">
						<span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;查询
					</button>
					<button id="databaseClear" type="button" class="btn btn-info btn-sm">
						<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
					</button>
					<button id="databaseAdd" type="button" class="btn btn-primary btn-sm">
						<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;新增
					</button>
				</div>
				<div class="col-sm-12" style="margin-top:10px; margin-bottom:10px; width: 880px;">
					<table id="databaseJqgridTable"></table>
					<div id="databaseJqgridPager" style="height:45px;"></div>
				</div>
			</div>
		</div>
	</div>
	<%--双击所属数据库弹窗部分end--%>

	<%--双击实体模块弹出部分begin--%>
	<div id="entityAddModal" style="display: none">
		<div>
			<ul class="nav nav-tabs" id="myTab">
				<li class="active">
					<a data-toggle="tab" href="#entity">
						<i></i>
						实体
					</a>
				</li>
				<li>
					<a data-toggle="tab" href="#field">
						<i></i>
						字段
					</a>
				</li>
				<li>
					<a data-toggle="tab" href="#preview">
						<i></i>
						预览
					</a>
				</li>
			</ul>
		</div>
		<div class="tab-content">
			<div id="entity" style="overflow: hidden;padding-left: 20px;"
				 class="tab-pane fade in active row">
				<form id="entityAddOrEditForm" action="">
					<table class="sun-form-table">
						<tr>
							<td><input type="text" name="id" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="xPosition" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="yPosition" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="type" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="engine" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="moduleId" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="versionId" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="projectId" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="databaseId" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="versionId" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="createTime" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="modifyTime" class="sun-form-input form-control hide"/></td>
							<td><input type="text" name="createAccountId" class="sun-form-input form-control hide"/>
							</td>
							<td><input type="text" name="modifyAccountId" class="sun-form-input form-control hide"/>
							</td>
						</tr>
						<tr>
							<th>中文名称</th>
							<td><input type="text" name="nameCn" class="sun-form-input form-control"
									   id="entityNameCn"
									   required="required" style="width: 400px;"/></td>
						</tr>
						<tr>
							<th>英文名称</th>
							<td><input type="text" name="name" class="sun-form-input form-control"
									   id="entityNameEn"
									   required="required" style="width: 400px;"/></td>
						</tr>
						<tr>
							<th>备注</th>
							<td colspan="4"><textarea rows="4" cols="1" name="remark"
													  class="sun-form-input form-control"
													  id="entityRemark" style="width: 400px;"></textarea>
							</td>
						</tr>
					</table>
				</form>
			</div>
			<div id="field" style="overflow: hidden" class="tab-pane fade">
				<div class="col-xs-12" style="margin-bottom: 10px;">
					<button type="button" class="btn btn-primary btn-sm" id="addField">
						<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;新增
					</button>
					<button type="button" class="btn btn-danger btn-sm" id="delField">
						<span class="glyphicon glyphicon-trash"></span>&nbsp;&nbsp;删除
					</button>
					<button type="button" class="btn btn-success btn-sm" id="copyField">
						<span class="glyphicon glyphicon-zoom-in"></span>&nbsp;&nbsp;复制
					</button>
					<button type="button" class="btn btn-purple btn-sm" id="insertTemplate">
						<span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;插入模板
					</button>
					<button type="button" class="btn btn-warning btn-sm" id="saveFieldSort">
						<span class="glyphicon glyphicon-arrow-up"></span>&nbsp;&nbsp;保存顺序
					</button>
				</div>

				<div class="col-xs-12">
					<table id="addOrEditFieldJqgridTable"></table>
					<div id="addOrEditFieldJqgridPager"></div>

				</div>
			</div>
			<div id="preview" style="overflow: hidden" class="tab-pane fade">
				<tr>
					<td colspan="4"><textarea rows="8" cols="1" name="script"
											  class="sun-form-input form-control"
											  id="entityScript"></textarea></td>
				</tr>
			</div>
		</div>
	</div>
	<%--双击实体模块弹出部分end--%>

	<%--增加版本部分start--%>
	<div class="modal-content" id="versionAddModal" style="display: none; padding: 10px;">
		<form id="addVersionForm" action="">
			<table class="sun-form-table">
				<tr>
					<td><input type="text" name="accountId" class="sun-form-input form-control hide"
							   id="accountId"/></td>
				</tr>
				<tr>
					<td><input type="text" name="projectId" class="sun-form-input form-control hide"
							   id="projectId"/></td>
				</tr>
				<tr>
					<th>版本名称</th>
					<td><input type="text" name="name" class="sun-form-input form-control" id="versionName"
							   required="required"/></td>

				</tr>
				<tr>
					<th>版本备注</th>
					<td colspan="4"><textarea rows="4" cols="1" name="remark"
											  class=" sun-form-input form-control"
											  id="versionRemark"></textarea></td>
				</tr>
			</table>
		</form>
	</div>
	<%--增加版本部分end--%>

	<%--新增关系模块弹出部分begin--%>
	<div class="modal-content" id="relAddOrEditModal" style="display: none; padding: 10px;">
		<form id="relAddOrEditModelForm" action="">
			<table class="sun-form-table">
				<tr>
					<td><input type="text" name="id" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="moduleId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="versionId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="startObjectId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="endObjectId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="points" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="startFieldId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="endFieldId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="multiplicityJson" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="createTime" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="modifyTime" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="createAccountId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="modifyAccountId" class="sun-form-input form-control hide"/></td>
				</tr>
				<tr>
					<th>中文名称</th>
					<td><input type="text" name="nameCn" class="sun-form-input form-control" id="relNameCn"
							   required="required"/></td>
					<th>英文名称</th>
					<td><input type="text" name="name" class="sun-form-input form-control" id="relNameEn"
							   required="required"/></td>
				</tr>
				<tr>
					<th>备注</th>
					<td colspan="4"><textarea rows="4" cols="1" name="remark"
											  class="sun-form-input form-control"
											  id="relRemark"></textarea></td>

				</tr>
				<tr>
					<th>实体1</th>
					<td><input type="text" name="entity1" class="sun-form-input form-control" id="entity1"
							   readonly="true"/></td>
					<th>实体2</th>
					<td><input type="text" name="entity2" class="sun-form-input form-control" id="entity2"
							   readonly="true"/></td>
				</tr>
				<tr>
					<th>字段1</th>
					<td>
						<select id="field1">
						</select>
					</td>
					<th>字段2</th>
					<td>
						<select id="field2">
						</select>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<%--新增关系模块弹出部分end--%>

	<%--新增数据库弹窗部分start--%>
	<div class="modal-content" id="databaseAddModal" style="display: none; padding: 10px;">
		<form id="databaseAddOrEditForm" action="">
			<table class="sun-form-table">
				<tr>
					<td><input type="text" name="id" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="createTime" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="modifyTime" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="createAccountId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="modifyAccountId" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="script" class="sun-form-input form-control hide"/></td>
					<td><input type="text" name="versionId" class="sun-form-input form-control hide"/></td>
				</tr>
				<tr>
					<th>英文名</th>
					<td><input type="text" name="name" class="sun-form-input form-control"
							   required="required"/></td>
				</tr>
				<tr>
					<th>中文名</th>
					<td><input type="text" name="nameCn" class="sun-form-input form-control"
							   required="required"/></td>
				</tr>
				<tr>
					<th>编码</th>
					<td>
						<select name="databaseCode" class="select2 form-control sun-form-select" id="addDbCode"
								required="required"
								style="padding-top: 0px;">
						</select>
					</td>
				</tr>
				<tr>
					<th>描述</th>
					<td colspan="4"><textarea rows="4" cols="1" name="remark" class="sun-form-input form-control"
											  id="dbUrl"></textarea></td>
				</tr>
			</table>
		</form>
	</div>
	<%--新增数据库弹窗部分end--%>
</div>

<!-- 插件js -->
<%--<script src="${path}/resources/ace/assets/js/jquery1x.js"></script>--%>
<script type="text/javascript" src="lib/jquery-2.1.0.min.js"></script>
<script src="${path}/resources/ace/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="lib/dialog/dialog.js"></script>
<script type="text/javascript" src="lib/tab/tab.js"></script>
<script type="text/javascript"
		src="${path}/resources/plugins/zTree/js/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="lib/comboBox/comboBox.js"></script>

<!-- 项目js -->
<script type="text/javascript">
	var path = '${path}';
	var accountId = '${sessionScope.CURRENT_USER_ID}';
	var DEFAULT_VERSION_ID = -1;
</script>

<script src="${path}/resources/plugins/layer/layer.js"></script>

<script src="${path}/resources/ace/assets/js/jqGrid/jquery.jqGrid.js" type="text/javascript"></script>
<script src="${path}/resources/ace/assets/js/jqGrid/i18n/grid.locale-cn.js" type="text/javascript"></script>
<%--<script src="${path}/resources/easyUI/jquery-easyui-1.4.5/jquery.easyui.min.js"
		type="text/javascript"></script>--%>
<script src="${path}/resources/sunmnet/sUtils.js" type="text/javascript"></script>
<script src="${path}/resources/sunmnet/bootstrap/sGrid.js" type="text/javascript"></script>
<script src="${path}/resources/sunmnet/bootstrap/utils.js" type="text/javascript"></script>
<script src="${path}/resources/ace/assets/js/x-editable/bootstrap-editable.js" type="text/javascript"></script>
<script src="${path}/resources/ace/assets/js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
	//便于定位问题代码
	slog = window.console;
</script>

<script type="text/javascript" src="js/jqueryUmlCanvas.js"></script>
<script type="text/javascript" src="js/editDialog.js"></script>
<script type="text/javascript" src="js/tool.js"></script>
<script type="text/javascript" src="js/jquery.tablednd.js"></script>
<script type="text/javascript" src="${path}/admin/powerdb/designer/dbConnInfo/js/dbConnInfo.js"></script>
<script type="text/javascript" src="${path}/admin/powerdb/designer/database/js/database.js"></script>
<script type="text/javascript" src="js/pdm.js"></script>
<script type="text/javascript" src="js/pdmOpenWin.js"></script>
<script type="text/javascript" src="js/edit.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</body>
<script type='text/javascript'>
	$(document).ready(function () {

		pdmOpenWin.init();

	});
</script>
</html>